<template>
	<div class="xtinformation-box">
		<div class="conheight">
			<div class="xtinformation-list" v-for="item in xtinforlist">
				<p><span v-text="new Date(Number(item.add_time)*1000).Format('yyyy年MM月dd日 hh:mm:ss')">12月1日</span></p>
				<div class="xtinformation-item">
					<h3 v-text="item.title">您有一笔新的收益</h3>
					<span v-text="new Date(Number(item.add_time)*1000).Format('MM月dd日')">12月1日</span>
					<p v-text="item.content">这是一段详情文字描述。这是一段详情文字描述。这是一段详情文字描述。这是一段详情文字描述。这是一段详情文字描述。这是一段详情文字描述。这是一段详情文字描述。</p>
					<div class="infor-xiangqing">
						<span @click="routertiao(item.status_type)">查看详情</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data () {
			return{
				user:0,
				xtinforlist:[]
			}
		},
		created:function(){
			this.user=localStorage.getItem("nt_user");
		},
		methods:{
			scrollbotoom:function(){
				var s=setTimeout(function(){
					console.log($('.conheight').height());
					$('.xtinformation-box').scrollTop($('.conheight').height());
				},100);	
			},
			routertiao:function(type){
				if(type==1){
					window.location.href = 'http://www.ntyouxuan.com/newnt/#/exorder';
					
					console.log("分销订单页面");
				}
				if(type==2){
					window.location.href = 'http://www.ntyouxuan.com/newnt/#/myorder/ordershou';
					
					console.log("跳转到订单详情页面");
				}
				if(type==3){
					window.location.href = 'http://www.ntyouxuan.com/newnt/#/withdraw';
					console.log("跳到余额");
				}
			}
		},
		mounted:function(){
			var self=this;
			$.ajax({
				type:"get",
				url:furl+"index.php?app=ajax_message&act=systempm",
				data:{'token':self.user},
				dataType:'json',
				success:function(res){
					if(res.done){
						self.xtinforlist=self.xtinforlist.concat(res.retval);
						self.scrollbotoom();
					}
				}
			});
		}
	}
</script>

<style>
	.xtinformation-box{font-size:0;height:100%;overflow-y: scroll;}
	.xtinformation-list{width:6.86rem;margin:0 auto;}
	.xtinformation-list>p{text-align: center;line-height: 0;padding-top:0.32rem;padding-bottom: 0.32rem;}
	.xtinformation-list>p>span{display: inline-block;padding:0.1rem 0.18rem;font-size:0.24rem;color:#fff;background-color:#DCDCDC;line-height: 0.24rem;}
	.xtinformation-item{background-color:#fff;border-radius:0.04rem;box-shadow: 0 0 0.04rem #dcdcdc;width:6.86rem;padding:0.26rem;box-sizing: border-box;}
	.xtinformation-item>h3{font-size:0.32rem;color:#4C9D31;line-height: 0.48rem;}
	.xtinformation-item>span{font-size:0.24rem;color:#999;line-height: 0.4rem;}
	.xtinformation-item>p{font-size:0.28rem;color:#2B2B2B;line-height: 0.42rem;margin-bottom: 0.2rem;}
	.infor-xiangqing{border-top:1px solid #eee;text-align: right;}
	.infor-xiangqing>span{display: inline-block;vertical-align: top;line-height: 0.5rem;border:1px solid #999;font-size:0.28rem;color:#666;padding-left: 0.34rem;padding-right: 0.34rem;border-radius:0.5rem;margin-top: 0.16rem;}
	.conheight{padding-bottom: 0.32rem;}
</style>